package com.example.litehdfs.config;


/**
 * 业务异常
 * @author mading
 *
 */
public class B2BServiceException extends RuntimeException{

	private static final long serialVersionUID = 1L;

	private int code;

    private Object data;

    public B2BServiceException(int code,String message) {
        super(message);
        this.code = code;
    }
    
    public B2BServiceException(String message) {
    	super(message);
    	this.code = CodeConstant.ERROR;
    }
    public B2BServiceException(String message, Throwable cause) {
    	super(message,cause);
    	this.code = CodeConstant.ERROR;
    }
    public B2BServiceException(int code,String message, Throwable cause) {
        super(message,cause);
        this.code = code;
    }

    public B2BServiceException(int code,String message,Object data){
        super(message);
        this.code = code;
        this.data = data;
    }

    public int getCode() {
      return code;
    }

    public void setCode(int code) {
      this.code = code;
    }

    public Object getData() {
      return data;
    }

    public void setData(Object data) {
      this.data = data;
    }


}
